//
//  WXSelectCarAreaTableViewController.m
//  CarJX
//
//  Created by jxcl on 14-10-31.
//  Copyright (c) 2014年 KK. All rights reserved.
//

#import "WXSelectCarAreaTableViewController.h"
#import "WXSelectCarAreaTableViewCell.h"
@interface WXSelectCarAreaTableViewController (){

    NSArray *pingyin;
    NSArray *shengfeng;
    NSArray *jiancheng;
}

@end

@implementation WXSelectCarAreaTableViewController

- (id)initWithStyle:(UITableViewStyle)style
{
    self = [super initWithStyle:style];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    [self setTitle:@"车牌归属"];
    [self.tableView registerNib:[UINib nibWithNibName:@"WXSelectCarAreaTableViewCell" bundle:nil] forCellReuseIdentifier:WXSelectCarArea];
    pingyin = @[@"AH",@"AM",@"BJ",@"CQ",@"FJ",@"GD",@"GS",@"GX",@"GZ",@"HB",@"HB",@"HLJ",@"HN",@"HN",@"HN",@"JL",@"JS",@"LN",@"JX",@"NMG",@"NX",@"QH",@"SC",@"SD",@"SH",@"SX",@"SX",@"TJ",@"TW",@"XG",@"XZ",@"XJ",@"YN",@"ZJ"];
    shengfeng = @[@"安徽",@"澳门",@"北京",@"重庆",@"福建",@"广东",@"甘肃",@"广西",@"贵州",@"河北",@"湖北",@"黑龙江",@"河南",@"湖南",@"海南",@"吉林",@"江苏",@"辽宁",@"江西",@"内蒙古",@"宁夏",@"青海",@"四川",@"山东",@"上海",@"山西",@"陕西",@"天津",@"台湾",@"香港",@"西藏",@"新疆",@"云南",@"浙江",];
    jiancheng = @[@"皖",@"澳",@"京",@"渝",@"闽",@"粤",@"甘",@"桂",@"贵",@"冀",@"鄂",@"黑",@"豫",@"湘",@"琼",@"吉",@"苏",@"辽",@"赣",@"蒙",@"宁",@"青",@"川",@"鲁",@"沪",@"晋",@"陕",@"津",@"台",@"港",@"藏",@"新",@"云",@"浙",];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
}

#pragma mark - Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{


    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{

    return shengfeng.count;
}


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    WXSelectCarAreaTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:WXSelectCarArea forIndexPath:indexPath];
    cell.shouZiMuLabel.text = pingyin[indexPath.row];
    cell.shengFeng.text = shengfeng[indexPath.row];
    cell.jianCheng.text = jiancheng[indexPath.row];
   
    return cell;
}

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    self.callBack(jiancheng[indexPath.row]);
    [self.navigationController popViewControllerAnimated:YES];
    
}

@end
